package com.power.leopard.remote.provider;

import java.util.LinkedList;
import java.util.List;

import com.power.leopard.ConfigManagerLoader;
import com.power.leopard.config.ConfigManager;
import com.power.leopard.constants.Constants;
import com.power.leopard.remote.common.process.ServiceInvocationFilter;
import com.power.leopard.remote.provider.domain.ProviderContext;
import com.power.leopard.remote.provider.filter.BusinessProcessFilter;

public class ProviderProcessHandlerFactory {

	private static ConfigManager configManager = ConfigManagerLoader.getConfigManager();
	private static boolean isMonitorEnabled = configManager.getBooleanValue(Constants.KEY_MONITOR_ENABLED, true);

	private static List<ServiceInvocationFilter<ProviderContext>> bizProcessFilters = new LinkedList<ServiceInvocationFilter<ProviderContext>>();

	public static void init() {
		registerBizProcessFilter(new BusinessProcessFilter());
	}
	
	private static void registerBizProcessFilter(ServiceInvocationFilter<ProviderContext> filter) {
		bizProcessFilters.add(filter);
	}
}
